<script setup lang="ts">
import { onMounted } from 'vue';
import modules from '../three/index';

onMounted(() => {
    initWord();
})

function initWord() {
    const dom = document.getElementById('open-world');
    if (!dom) return;
    const viewer = new modules.Viewer(dom);
    // const InputManager = new modules.InputManager(viewer);
    const Sky = new modules.Sky(viewer);
    const loaderManger = new modules.ModelManager(viewer)
    loaderManger.loadModelToScene('public/glb/world.glb');
}


</script>

<template>
    <div id="open-world">

    </div>
</template>

<style lang="less" scoped>
#open-world {
    width: 100%;
    height: 100%;
}
</style>
